﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace OpenSees.XML
{
    /// <summary>
     /// 单元响应
     /// </summary>
    public class ElementResponse : Response
    {
        /// <summary>
        /// 单元类型
        /// </summary>
        [XmlAttribute]
        public string eleType { set; get; }

        /// <summary>
        /// 单元编号
        /// </summary>
        [XmlAttribute]
        public int eleTag { set; get; }

        /// <summary>
        /// i端节点
        /// </summary>
        [XmlAttribute]
        public int node1 { set; get; }

        /// <summary>
        /// j端节点
        /// </summary>
        [XmlAttribute]
        public int node2 { set; get; }

        /// <summary>
        /// 高斯积分点分析结果
        /// </summary>
        [XmlElement("GaussPointOutput")]
        public GaussPrtXML GaussPointOutput { set; get; }

        [XmlIgnore]
        /// <summary>
        /// 编号
        /// </summary>
        public override int ID
        {
            get
            {
                return this.eleTag;
            }
            set
            {

            }
        }

        /// <summary>
        /// 空的构造函数
        /// </summary>
        public ElementResponse()
        {

        }
    }

    /// <summary>
    /// 高斯积分点
    /// </summary>
    public class GaussPrtXML
    {
        /// <summary>
        /// 高斯点位置
        /// </summary>
        [XmlAttribute]
        public int number { set; get; }

        /// <summary>
        /// 未知
        /// </summary>
        [XmlAttribute]
        public double eta { set; get; }

        /// <summary>
        /// 截面分析结果
        /// 不可以列表输出
        /// </summary>
        [XmlElement("SectionOutput")]
        public SectionResponse SectionOutput { set; get; }

        /// <summary>
        /// 空的构造函数
        /// </summary>
        public GaussPrtXML()
        {
            this.SectionOutput = new SectionResponse();
        }
    }
}
